#pragma once

#include <iostream>
#include <vector>
#include <map>
#include <string>

using std::ostream;
using std::string;

template <class Container> 
void toInitList(ostream &oss, const Container &obj) {
    oss << "{";
    for (auto it = std::begin(obj); it != std::end(obj);) {
        toInitList(oss, *it);
        ++it;
        if (it != std::end(obj)) {
            oss << ", ";
        }
    }
    oss << "}";
}

static void toInitList(ostream &oss, int i) { oss << i; }

static void toInitList(ostream &oss, const string &s) { oss << "\"" << s << "\""; }

template <class K, class V>
static void toInitList(ostream &oss, const std::pair<K, V> &obj) {
    oss << "{";
    toInitList(oss, obj.first);
    oss << ", ";
    toInitList(oss, obj.second);
    oss << "}";
}
